<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.gxgyl.com All rights reserved.

// +----------------------------------------------------------------------
// | Author: Liuyu
// +----------------------------------------------------------------------
declare (strict_types = 1);

namespace app\common\model\shiyao;

use cores\BaseModel;

/**
 * 模型
 * Class
 * @package app\common\model
 */
class Center extends BaseModel {
	// 定义表名
	protected $name = 'shiyao_center';

	// 定义主键
	protected $pk = 'center_id';

	/**
	 * 追加字段
	 * @var array
	 */
	protected $append = [];

	public function add(array $data) {

		// 添加
		return $this->transaction(function () use ($data) {

			$data = array_merge($data, [
				'store_id' => self::$storeId,
			]);
			$this->save($data);

			return true;
		});
	}
	

}
